<?php
/**
 * Created by PhpStorm.
 * User: User
 * Date: 2017/10/9
 * Time: 19:19
 */

 class Shape{
     public function getArea(){}
     public static function getPi(){
         return 3.14;
     }
}
echo Shape::getPi();

class Rectangle extends  Shape{
    private $width,$height;
    public function _construct($width,$height){
        $this->width=$width;
        $this->height=$height;
    }
    public  function getArea(){
        return $this->width*$this->height;
    }
}
class Rect extends Rectangle{
    public function _construct($width){
        parent::_construct($width,$height);
    }
}
$r=new Rect();

echo $r->getArea();


